﻿using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Reflection;

public partial class services_SiteServices : System.Web.UI.Page
{
    protected string Method;
    protected List<string> Arguments = new List<string>();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["method"] != null)
            Method = Request.QueryString["method"];

        foreach (string key in Request.QueryString.AllKeys)
        {
            if (key != "method")
                Arguments.Add(Request.QueryString[key]);
        }

        MethodInfo methodinfo = this.GetType().GetMethod(Method);

        methodinfo.Invoke(this, Arguments.ToArray());
    }

    private void Contact(string websiteid, string fromname, string fromemail, string subject, string message)
    {
        Response.Write("website=" + websiteid);
        Response.Write("fromname=" + fromname);
        Response.Write("fromemail=" + fromemail);
        Response.Write("subject=" + subject);
        Response.Write("message=" + message);
    }

}
